<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 200px;
            height: 200px;
            background-color: red;

        }

    </style>
</head>
<body>
    <button id="btn1">单击</button>
    <button id="btn2">双击</button>
    <button id="btn3">鼠标放下</button>
    <button id="btn4">鼠标抬起</button>
    <div id="box"></div>

    <script>
        var btn1 = document.getElementById("btn1");
        btn1.onclick = function(){
            console.log("单击了");
        }

        var btn2 = document.getElementById("btn2");
        btn2.ondblclick = function(){
            console.log("双击了");
        }

        var btn3 = document.getElementById("btn3");
        btn3.onmousedown = function(){
            console.log("鼠标放下了");
        }

        var btn4 = document.getElementById("btn4");
        btn4.onmouseup = function(){
            console.log("鼠标抬起了");
        }

        var box = document.getElementById("box");
        box.onmousemove = function(){
            console.log("鼠标进入了");
        }

    </script>

</body>
</html>